﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>验证码</title>
    <script src="./yzm.js"></script>
</head>
<body>
    <input id="bbb" type="text" style="width:200px;height:40px"/>
    <div id="aaa" style="width:80px;height:40px" ></div>
    <input type="button" value="验证" onclick="cg()" />
    <script>
        var a = scyzm("aaa");//生成验证码
        function cg() {
            var b = document.getElementById("bbb").value;
            if (a.toLowerCase() == b.toLowerCase()) {
                alert("正确");
            }

            else {
                alert("错误");
            }
        }
        
    </script>
</body>
</html>